<template>
  <span :class="cla">{{index + 1}}: {{result}}</span>
</template>

<script>
export default {
  props: ['result', 'index'],
  computed: {
    cla () {
      if (this.result == '正确') {
        return 'right'
      } else if (this.result == '错误') {
        return 'error'
      } else {
        return 'undo'
      }
    }
  }
};
</script>

<style scoped>
.right {
  color: green;
}
.error {
  color: red;
}
.undo {
  color: #ccc;
}
</style>